1. Field of the Invention
This invention relates to power management for computer systems and, more particularly, to prevention of false remote system wake events after a computer system suffers a power loss.
2. Description of the Related Art
Many computer systems, including personal computers, workstations, servers, and embedded systems are designed to have multiple peripheral devices included in the system. A typical personal computer system includes a processor, associated memory and control logic, and a number of peripheral devices that provide input and output (I/O) for the system. Such peripheral devices include, for example, compact disc read-only memory (CD-ROM) drives, hard disk drives, floppy disk drives, and other mass storage devices such as tape drives, compact disc recordable (CD-R) drives, or digital video/versatile disk (DVD) drives. Additionally, the underlying circuitry of computer systems including processors, graphics chips, memories, and control logic are continually becoming more complex and feature-rich.
One of the features of newer computers is directed towards reducing the computer""s power consumption. To reduce power consumption, various components of a computer system can be placed into a variety of different power states with differing levels of power consumption. For example, video output from a computer system, processor operation, and hard disk drive rotation can be deactivated during periods of system inactivity. More sophisticated power management schemes have been developed and implemented as industry standards including the Advanced Power Management (APM) Specification described in the Advanced Power Management (APM) BIOS Interface Specification, Revision 1.2, dated February, 1996, and the Advanced Configuration and Power Interface (ACPI) standard described in the Advanced Configuration and Power Interface Specification, Revision 1.0, dated Dec. 22, 1996, both of which are hereby incorporated herein, in there entirety, by reference.
Such standards define a variety of operational states depending upon system activity and the amount of power being consumed. For example, the ACPI specification defines six xe2x80x9csleepingxe2x80x9d states S0-S5. In the S0 state (also known as the G0 state) the computer system is fully on and operational, consuming maximum power. In the S5 state (also known as the soft-off state) the computer system consumes a minimal amount of power. No code is executed in the computer system, almost all devices are inactive, and the computer system awaits a wakeup event to transition it to a higher activity state. Awakening from the soft-off state requires a complete boot of the computer system because no system context is saved prior to entering S5. The sleep states between S0 and S5 each specify varying amounts of component activity and therefore power consumption. States S1-S4 may have differing wakeup latency times depending upon which devices are inactive, how much computer system context was saved prior to entering the sleep state, and other factors. Power management schemes like APM and ACPI need not have multiple sleep states, but may simply have a fully on state and a state of lower power consumption, such as a soft-off power state.
Another feature in computer systems allows the system to be configured to wake from the soft-off sleep state in response to a variety of different wakeup events (xe2x80x9cremote system wake eventsxe2x80x9d) which include waking up on local area network (LAN) where the computer system""s LAN adapter or network interface card (NIC) monitors network traffic for a wakeup signal such as a Magic Packet(trademark), wakeup on ring indicated (RI) where a modem asserts its RI line when it detects a ring on the phone line, and wakeup from any other external signal designed to wake a computer up from a low-power or soft-off state. Remote system wake events provide greater manageability of computer systems by allowing system administrators to manage large numbers of computers remotely without having to keep all computers powered up. When maintenance is needed for a computer system, the administrator can send a remote system wake event to the computer to wake up the computer, perform necessary maintenance on the computer remotely by adding, deleting, or modifying settings and files on the computer, and then remotely power-off the remote computer back to the original soft-off state.
System support for these wakeup events is usually implemented in a power management circuit that is part of the computer system""s core logic chipset. One example of a core logic chip that includes power management circuitry is available from Intel Corporation under the trade designation 82371AB PCI-to-ISA/IDE Xcelerator (PIIX4). The PIIX4 supports wakeup from soft-off events by maintaining power to its suspend well logic and monitoring appropriate registers, while power to the rest of the chip (and most or all of the rest of the computer system) is removed. In one example of enabling a computer system using the PIIX4 to transition from the soft-off state to the full on power state after a remote system wake event generated from a LAN card, bit 9 of the PIIX4""s General Purpose Enable Register (GPEN) is set to 1. With remote system wake events from a LAN card thus enabled, when the PIIX4 receives an appropriate signal from the attached network, bit 9 of the General Purpose Status Register (GPSTS) is asserted and the computer system begins the transition to the fully on power state.
As the example of the PIIX4 illustrates, when the system is in the soft-off state, it appears to a user that the system is off, even though some power management circuitry is still powered and monitoring inputs, such as the power button, to determine if the system should be turned on. Typically, a user first selects desired wakeup events via a system setup utility, which stores appropriate settings in a nonvolatile memory (usually a battery backed static random access memory (SRAM)) so that the computer system""s basic input output system (BIOS) can restore the settings each time the computer system performs a complete boot and/or when the computer system performs a normal shutdown (e.g., a transition to the soft-off power state).
Waking a system up from a soft-off state generally works well when the power level to the computer system is stable and the system stays in the soft-off state. However, when an invalid shutdown event occurs (e.g., a power loss due to AC power failure), and subsequently corrected (e.g., power is re-applied) a false wake event sometimes occurs. The false wake event is sometimes the result of a race condition wherein components of the computer system receive power simultaneously and generate unpredictable signals from components, such as the LAN card and modem, to the computer system. These signals may appear to the computer system to be a wakeup command. Two side effects may result from the false wake event. First, the system password (if implemented) may be skipped. Many computer systems bypass the system password when a system administrator issues a remote wake command in order to wake up the computer system. This is done to prevent a computer system from booting to a password screen which would require someone local to the system supply a password which would defeat the purpose of remote system wake events. In a false wake condition, power re-applied to a computer system causes the system to behave as if a remote wake command has been issued, thereby bypassing the system password.
Second, some computer systems provide an AC power recovery feature that allows the user to define what power state the machine should enter following an AC power loss and subsequent recovery. The power recovery options are typically xe2x80x9cONxe2x80x9d, xe2x80x9cOFFxe2x80x9d, and xe2x80x9cLAST.xe2x80x9d Some organizations are sensitive to large quantities of computer systems switching to the xe2x80x9cONxe2x80x9d state during a subsequent recovery because of the large AC power surge that would occur. For this reason, these organizations may choose the xe2x80x9cOFFxe2x80x9d option. However, a false wake condition caused by AC recovery would cause the systems to behave as if they received a wakeup command, causing large numbers of computers to turn on after AC recovery thereby creating a potential AC power surge.
It has been discovered that determining when an invalid event occurs and responsively bypassing a system""s remote system wake event functions allows a computer system to be returned to the soft-off power state. Because power has just been restored to the computer system, it is improbable that a remote system wake event and power restoration condition occur simultaneously.
Accordingly, one aspect of the present invention provides a method of determining whether an invalid event (e.g., AC power loss) occurred in the computer system. When the power restoration was caused by an invalid event, wakeup event information is read from a nonvolatile memory and the computer system bypasses remote wakeup processing.
Another aspect of the invention provides a basic input output system (BIOS). The BIOS includes a wakeup routine, a reset determination routine, and a reset handling routine. The wakeup routine responds to remote system wake events to wake the computer system up from a soft-off state. The reset determination routine determines whether an invalid event occurred in the computer system. The reset handling routine bypasses the wakeup routine if it is determined that an invalid event occurred in the computer system.
In still another aspect of the invention, a computer system includes a processor, a volatile memory coupled to the processor, a nonvolatile memory coupled to the processor, a power management circuit coupled to the processor, and a basic input output system (BIOS). The power management circuit includes at least one wakeup event register. The BIOS is encoded in a computer readable medium as instructions executable on the processor, and includes a remote system wake event routine, a reset determination routine, and a reset handling routine. The remote system wake event responds to remote system wake commands to wake the computer system up from a soft-off state. The reset determination routine determines whether an invalid event occurred in the computer system. The reset handling routine bypasses the wakeup routine if it is determined that an invalid event occurred in the computer system.